import request from "@/axios";

// 获取所有公司
export const getAllCompanys = () =>
  request({
    url: "/api/company/getallcompanys",
    method: "get"
  });

// 获取公司的全部角色
export const getRolesByCompany = option =>
  request({
    url: "/api/auth/getrolesbycompanyid",
    method: "get",
    params: option
  });

// 获取超级管理员的选择员工列表
export const getSpecialUsers = option =>
  request({
    url: "/api/company/getspecialuserlist",
    method: "get",
    params: option
  });

// 更换超级管理员图形验证码
export const transferAdminCaptcha = option =>
  request({
    url: "/api/auth/transferadmincaptcha",
    method: "get",
    params: option,
    responseType: "blob"
  });

// 更换超级管理员手机验证码
export const transferAdminCode = option =>
  request({
    url: "/api/auth/sendtransferadmincode",
    method: "get",
    params: option
  });

// 更换超级管理员
export const transferAdmin = option =>
  request({
    url: "/api/auth/transferadmin",
    method: "get",
    params: option
  });

// 点价限制列表
export const getPricelimitList = option =>
  request({
    url: "/api/company/getpricelimitlist",
    method: "get",
    params: option
  });

// 点价限制详情
export const getPricelimitDetail = option =>
  request({
    url: "/api/company/getpricelimitdetail",
    method: "get",
    params: option
  });

// 新增点价限制
export const addPricelimit = option =>
  request({
    url: "/api/company/addpricelimit",
    method: "post",
    data: option
  });

// 更新点价限制
export const updatePricelimit = option =>
  request({
    url: "/api/company/updatepricelimit",
    method: "post",
    data: option
  });

// 删除点价限制
export const deletePricelimit = option =>
  request({
    url: "/api/company/deletepricelimit",
    method: "get",
    params: option
  });

// 获取业务跟进品种
export const getBusinessCategory = option =>
  request({
    url: "/api/company/getcompanyuserlimitcategory",
    method: "get",
    params: option
  });

// 根据名称获取客户列表
export const getcustomerbyname = option =>
  request({
    url: "/api/company/getcustomerbyname",
    method: "get",
    params: option
  });

// 切换公司列表
export const selectcompanylist = option =>
  request({
    url: "/api/company/selectcompanylist",
    method: "get",
    params: option
  });

// 供应商基本信息
export const getcompanyqccinfobyid = option =>
  request({
    url: "/api/company/getcompanyqccinfobyid",
    method: "get",
    params: option
  });

// 移除用户企业认证(企业已通过、已拒绝和未激活状态)
export const removeusercompanyauth = option =>
  request({
    url: "/api/company/removeusercompanyauth",
    method: "get",
    params: option
  });

// 移除2.0用户认证新企业(超级管理员)失败记录
export const removeusernewcompanyauthfail = option =>
  request({
    url: "/api/company/removeusernewcompanyauthfail",
    method: "get",
    params: option
  });
